300 |
How do I change the cell's foreground color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"C1"); spG2antt1->GetColumns()->Add(L"C2"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellValue(h,long(1),"Cell 2"); var_Items->PutCellForeColor(h,long(1),RGB(255,0,0)); |
299 |
How do I change the visual effect for the cell, using your EBN files
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spG2antt1->GetColumns()->Add(L"C1"); spG2antt1->GetColumns()->Add(L"C2"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellValue(h,long(1),"Cell 2"); var_Items->PutCellBackColor(h,long(1),0x1000000); |
298 |
How do I change the cell's background color
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"C1"); spG2antt1->GetColumns()->Add(L"C2"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellValue(h,long(1),"Cell 2"); var_Items->PutCellBackColor(h,long(1),RGB(255,0,0)); |
297 |
How do I change the caption or value for a particular cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"C1"); spG2antt1->GetColumns()->Add(L"C2"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Cell 1"),long(1),"Cell 2"); |
296 |
How do I get the handle of the cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutCellBold(vtMissing,var_Items->GetItemCell(h,long(0)),VARIANT_TRUE); |
295 |
How do I retrieve the focused item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetFocusItem(),VARIANT_TRUE); |
294 |
How do I get the number or count of child items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->AddItem(var_Items->GetChildCount(h)); |
293 |
How do I enumerate the visible items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->PutItemBold(var_Items->GetFirstVisibleItem(),VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetNextVisibleItem(var_Items->GetFirstVisibleItem()),VARIANT_TRUE); |
292 |
How do I enumerate the siblings items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->PutItemBold(var_Items->GetNextSiblingItem(var_Items->GetFirstVisibleItem()),VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetPrevSiblingItem(var_Items->GetNextSiblingItem(var_Items->GetFirstVisibleItem())),VARIANT_TRUE); |
291 |
How do I get the parent item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetItemParent(var_Items->GetItemChild(h)),VARIANT_TRUE); |
290 |
How do I get the first child item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->PutItemBold(var_Items->GetItemChild(h),VARIANT_TRUE); |
289 |
How do I enumerate the root items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutItemBold(var_Items->GetRootItem(0),VARIANT_TRUE); var_Items->PutItemUnderline(var_Items->GetRootItem(1),VARIANT_TRUE); |
288 |
I have a hierarchy, how can I count the number of root items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root 1"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->AddItem("Root 2"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->AddItem(var_Items->GetRootCount()); |
287 |
How can I make an item unselectable, or not selectable
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("unselectable - you can't get selected"); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->AddItem("selectable"); |
286 |
How can I hide or show an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Column"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("hidden"); var_Items->PutItemHeight(h,0); var_Items->PutSelectableItem(h,VARIANT_FALSE); var_Items->AddItem("visible"); |
285 |
How can I change the height for all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutDefaultItemHeight(32); spG2antt1->GetColumns()->Add(L"Column"); spG2antt1->GetItems()->AddItem("One"); spG2antt1->GetItems()->AddItem("Two"); |
284 |
How do I change the height of an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutScrollBySingleLine(VARIANT_TRUE); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutItemHeight(var_Items->AddItem("height"),128); spG2antt1->GetItems()->AddItem("enabled"); |
283 |
How do I disable or enable an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutEnableItem(var_Items->AddItem("disabled"),VARIANT_FALSE); spG2antt1->GetItems()->AddItem("enabled"); |
282 |
How do I display as strikeout a cell
|
281 |
How do I display as strikeout a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValueFormat(var_Items->AddItem("gets <s>strikeout</s> only a portion of text"),long(0),EXG2ANTTLib::exHTML); |
280 |
How do I display as strikeout an item
|
279 |
How do I underline a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellUnderline(var_Items->AddItem("underline"),long(0),VARIANT_TRUE); |
278 |
How do I underline a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValueFormat(var_Items->AddItem("gets <u>underline</u> only a portion of text"),long(0),EXG2ANTTLib::exHTML); |
277 |
How do I underline an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutItemUnderline(var_Items->AddItem("underline"),VARIANT_TRUE); |
276 |
How do I display as italic a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellItalic(var_Items->AddItem("italic"),long(0),VARIANT_TRUE); |
275 |
How do I display as italic a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValueFormat(var_Items->AddItem("gets <i>italic</i> only a portion of text"),long(0),EXG2ANTTLib::exHTML); |
274 |
How do I display as italic an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutItemItalic(var_Items->AddItem("italic"),VARIANT_TRUE); |
273 |
How do I bold a cell
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellBold(var_Items->AddItem("bold"),long(0),VARIANT_TRUE); |
272 |
How do I bold a cell or an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValueFormat(var_Items->AddItem("gets <b>bold</b> only a portion of text"),long(0),EXG2ANTTLib::exHTML); |
271 |
How do I bold an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutItemBold(var_Items->AddItem("bold"),VARIANT_TRUE); |
270 |
How do I change the foreground color for the item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutItemForeColor(hC,RGB(255,0,0)); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
269 |
How do I change the visual appearance for the item, using your EBN technology
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutItemBackColor(hC,0x1000000); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
268 |
How do I change the background color for the item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); long hC = var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->PutItemBackColor(hC,RGB(255,0,0)); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
267 |
How do I expand or collapse an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
266 |
How do I associate an extra data to an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutItemData(var_Items->AddItem("item"),"your extra data"); |
265 |
How do I get the number or count of items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems(); var_Items1->AddItem(var_Items1->GetItemCount()); |
264 |
How can I specify the width of the ActiveX control, when using the InsertControlItem property
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutScrollBySingleLine(VARIANT_FALSE); spG2antt1->PutTreeColumnIndex(1); spG2antt1->PutDrawGridLines(EXG2ANTTLib::exAllLines); spG2antt1->GetColumns()->Add(L"C1"); spG2antt1->GetColumns()->Add(L"C2"); spG2antt1->GetColumns()->Add(L"C3"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->InsertControlItem(vtMissing,L"MSCAL.Calendar",vtMissing); var_Items->PutItemWidth(h,128); var_Items->PutCellValue(h,long(0),"This is a bit of text that is shown in the first column"); var_Items->PutCellSingleLine(h,long(0),EXG2ANTTLib::exCaptionWordWrap); var_Items->PutCellValue(h,long(2),"This is a bit of text that is shown in the third column"); var_Items->PutCellSingleLine(h,long(2),EXG2ANTTLib::exCaptionWordWrap); |
263 |
How can I put the ActiveX control in a different column, when using the InsertControlItem property
|
262 |
Is there any function I can use to get the program or the control identifier I've been using when called the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); spG2antt1->PutScrollBySingleLine(VARIANT_FALSE); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->InsertControlItem(vtMissing,L"MSCAL.Calendar",vtMissing); var_Items->InsertItem(h,vtMissing,var_Items->GetItemControlID(h)); var_Items->PutExpandItem(h,VARIANT_TRUE); h = var_Items->InsertControlItem(vtMissing,L"MSChart20Lib.MSChart",vtMissing); var_Items->PutItemAppearance(h,EXG2ANTTLib::Etched); var_Items->InsertItem(h,vtMissing,var_Items->GetItemControlID(h)); var_Items->PutExpandItem(h,VARIANT_TRUE); |
261 |
How can I change the height of newly created ActiveX control, using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); spG2antt1->PutScrollBySingleLine(VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutItemHeight(var_Items->InsertControlItem(vtMissing,L"MSCAL.Calendar",vtMissing),64); var_Items->PutItemAppearance(var_Items->InsertControlItem(vtMissing,L"MSChart20Lib.MSChart",vtMissing),EXG2ANTTLib::Etched); |
260 |
How can I change the border for newly created ActiveX control, using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); spG2antt1->PutScrollBySingleLine(VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutItemAppearance(var_Items->InsertControlItem(vtMissing,L"MSCAL.Calendar",vtMissing),EXG2ANTTLib::Sunken); var_Items->PutItemAppearance(var_Items->InsertControlItem(vtMissing,L"MSChart20Lib.MSChart",vtMissing),EXG2ANTTLib::Etched); |
259 |
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); /* Copy and paste the following directives to your header file as it defines the namespace 'MSACAL' for the library: 'Microsoft Calendar Control 2007' #import <MSCAL.OCX> */ MSACAL::ICalendarPtr var_Calendar = ((MSACAL::ICalendarPtr)(var_Items->GetItemObject(var_Items->InsertControlItem(h,L"MSCAL.Calendar",vtMissing)))); var_Calendar->PutBackColor(RGB(255,255,255)); var_Calendar->PutGridCellEffect(0); var_Calendar->PutShowTitle(VARIANT_FALSE); var_Calendar->PutShowDateSelectors(VARIANT_FALSE); var_Items->PutExpandItem(h,VARIANT_TRUE); |
258 |
How can I access the properties and methods for an ActiveX control that I've just added using the InsertControlItem
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); /* Copy and paste the following directives to your header file as it defines the namespace 'MSACAL' for the library: 'Microsoft Calendar Control 2007' #import <MSCAL.OCX> */ MSACAL::ICalendarPtr var_Calendar = ((MSACAL::ICalendarPtr)(var_Items->GetItemObject(var_Items->InsertControlItem(h,L"MSCAL.Calendar",vtMissing)))); var_Calendar->PutBackColor(RGB(255,255,255)); var_Items->PutExpandItem(h,VARIANT_TRUE); |
257 |
How can I insert an ActiveX control
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertControlItem(h,L"MSCAL.Calendar",vtMissing); var_Items->PutExpandItem(h,VARIANT_TRUE); |
256 |
How can I change at runtime the parent of the item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long hP = var_Items->AddItem("Root"); long hC = var_Items->AddItem("Child"); var_Items->SetParent(hC,hP); |
255 |
How can I sort the items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); spG2antt1->GetColumns()->GetItem("Default")->PutSortOrder(EXG2ANTTLib::SortDescending); |
254 |
How do I sort the child items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Root"); var_Items->InsertItem(h,vtMissing,"Child 1"); var_Items->InsertItem(h,vtMissing,"Child 2"); var_Items->PutExpandItem(h,VARIANT_TRUE); var_Items->SortChildren(h,long(0),VARIANT_FALSE); |
253 |
How can I ensure or scroll the control so the item fits the control's client area
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); long h = spG2antt1->GetItems()->AddItem("item"); spG2antt1->GetItems()->EnsureVisibleItem(h); |
252 |
How can I remove or delete all items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); spG2antt1->GetItems()->AddItem("removed item"); spG2antt1->GetItems()->RemoveAllItems(); |
251 |
How can I remove or delete an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"Default"); long h = spG2antt1->GetItems()->AddItem("removed item"); spG2antt1->GetItems()->RemoveItem(h); |
250 |
How can I add or insert child items
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->GetColumns()->Add(L"C1"); spG2antt1->GetColumns()->Add(L"C2"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); long h = var_Items->AddItem("Cell 1"); var_Items->PutCellValue(h,long(1),"Cell 2"); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 3"),long(1),"Cell 4"); var_Items->PutCellValue(var_Items->InsertItem(h,vtMissing,"Cell 5"),long(1),"Cell 6"); var_Items->PutExpandItem(h,VARIANT_TRUE); |
249 |
How can I add or insert a child item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutLinesAtRoot(EXG2ANTTLib::exLinesAtRoot); spG2antt1->GetColumns()->Add(L"Default"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->InsertItem(var_Items->AddItem("root"),vtMissing,"child"); |
248 |
How can I add or insert an item
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"C1"); spG2antt1->GetColumns()->Add(L"C2"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("Cell 1"),long(1),"Cell 2"); long h = var_Items->AddItem("Cell 3"); var_Items->PutCellValue(h,long(1),"Cell 4"); |
247 |
How can I add or insert an item
|
246 |
How can I get the columns as they are shown in the control's sortbar
|
245 |
How can I access the properties of a column
|
244 |
How can I remove all the columns
|
243 |
How can I remove a column
|
242 |
How can I get the number or the count of columns
|
241 |
How can I change the font for all cells in the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ stdole::FontPtr f = ::CreateObject(L"StdFont"); f->PutName(L"Tahoma"); f->PutSize(_variant_t(long(12))); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutFont(IFontDispPtr(((stdole::FontPtr)(f)))); var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToColumns); spG2antt1->GetColumns()->Add(L"Column"); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
240 |
How can I change the background color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutBackColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToColumns); spG2antt1->GetColumns()->Add(L"Column"); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
239 |
How can I change the foreground color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToColumns); spG2antt1->GetColumns()->Add(L"Column"); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
238 |
How can I show as strikeout all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutStrikeOut(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToColumns); spG2antt1->GetColumns()->Add(L"Column"); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
237 |
How can I underline all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutUnderline(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToColumns); spG2antt1->GetColumns()->Add(L"Column"); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
236 |
How can I show in italic all data in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutItalic(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToColumns); spG2antt1->GetColumns()->Add(L"Column"); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
235 |
How can I bold the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"1",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::exFormatToColumns); spG2antt1->GetColumns()->Add(L"Column"); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
234 |
How can I display a computed column and highlight some values that are negative or less than a value
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"A"); spG2antt1->GetColumns()->Add(L"B"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"(A+B)*1.19")))->PutComputedField(L"(dbl(%0) + dbl(%1)) * 1.19"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2)); EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(10)),long(1),long(20)); EXG2ANTTLib::IConditionalFormatPtr var_ConditionalFormat = spG2antt1->GetConditionalFormats()->Add(L"dbl(%2) > 10",vtMissing); var_ConditionalFormat->PutBold(VARIANT_TRUE); var_ConditionalFormat->PutForeColor(RGB(255,0,0)); var_ConditionalFormat->PutApplyTo(EXG2ANTTLib::FormatApplyToEnum(0x2)); |
233 |
Can I display a computed column so it displays the VAT, or SUM
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"A"); spG2antt1->GetColumns()->Add(L"B"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"(A+B)*1.19")))->PutComputedField(L"(dbl(%0) + dbl(%1)) * 1.19"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2)); EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(10)),long(1),long(20)); |
232 |
How can I show a column that adds values in the cells
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"A"); spG2antt1->GetColumns()->Add(L"B"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"A+B")))->PutComputedField(L"dbl(%0) + dbl(%1)"); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(1)),long(1),long(2)); EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(10)),long(1),long(20)); |
231 |
Is there any function to filter the control's data as I type, so the items being displayed include the typed characters
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Filter"))); var_Column->PutFilterOnType(VARIANT_TRUE); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutAutoSearch(EXG2ANTTLib::exContains); spG2antt1->GetItems()->AddItem("Canada"); spG2antt1->GetItems()->AddItem("USA"); |
230 |
Is there any function to filter the control's data as I type, something like filter on type
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Filter"))); var_Column->PutFilterOnType(VARIANT_TRUE); var_Column->PutDisplayFilterButton(VARIANT_TRUE); spG2antt1->GetItems()->AddItem("Canada"); spG2antt1->GetItems()->AddItem("USA"); |
229 |
How can I programmatically filter a column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Filter"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutFilterType(EXG2ANTTLib::exNonBlanks); spG2antt1->GetItems()->AddItem(vtMissing); spG2antt1->GetItems()->AddItem("not empty"); spG2antt1->ApplyFilter(); |
228 |
How can I show or display the control's filter
|
227 |
How can I customize the items being displayed in the drop down filter window
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Custom Filter"))); var_Column->PutDisplayFilterButton(VARIANT_TRUE); var_Column->PutDisplayFilterPattern(VARIANT_FALSE); var_Column->PutCustomFilter(_bstr_t("Excel Spreadsheets (*.xls )||*.xls|||Word Documents||*.doc|||Powerpoint Presentations||*.pps|||Text Documents (*.log,*.txt)||*.") + "txt|*.log"); var_Column->PutFilterType(EXG2ANTTLib::exPattern); var_Column->PutFilter(L"*.xls"); spG2antt1->GetItems()->AddItem("excel.xls"); spG2antt1->GetItems()->AddItem("word.doc"); spG2antt1->GetItems()->AddItem("pp.pps"); spG2antt1->GetItems()->AddItem("text.txt"); spG2antt1->ApplyFilter(); |
226 |
How can I change the order or the position of the columns in the sort bar
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutSortBarVisible(VARIANT_TRUE); spG2antt1->PutSortBarColumnWidth(48); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"C1")))->PutSortOrder(EXG2ANTTLib::SortAscending); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"C2")))->PutSortOrder(EXG2ANTTLib::SortDescending); spG2antt1->GetColumns()->GetItem("C2")->PutSortPosition(0); |
225 |
How do I arrange my columns on multiple levels
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"S")))->PutWidth(32); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Level 2")))->PutLevelKey(long(1)); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Level 3")))->PutLevelKey(long(1)); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Level 4")))->PutLevelKey(long(1)); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Level 1")))->PutLevelKey("2"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Level 2")))->PutLevelKey("2"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Level 3")))->PutLevelKey("2"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Level 4")))->PutLevelKey("2"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"E")))->PutWidth(32); |
224 |
How do I arrange my columns on multiple lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->PutHeaderHeight(32); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"")))->PutHTMLCaption(L"Line 1<br>Line 2"); |
223 |
How can I display all cells using HTML format
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"HTML")))->PutDef(EXG2ANTTLib::exCellValueFormat,long(1)); spG2antt1->GetItems()->AddItem("<font ;12>T</font>his <b>is</b> an <a>html</a> <font Tahoma><fgcolor=FF0000>text</fgcolor></font>."); |
222 |
How can I display all cells using multiple lines
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"MultipleLine")))->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"SingleLine")))->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_TRUE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("This is a bit of long text that should break the line"),long(1),"this is a bit of long text that's displayed on a single line"); |
221 |
How do change the vertical alignment for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"MultipleLine")))->PutDef(EXG2ANTTLib::exCellSingleLine,VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"VAlign")))->PutDef(EXG2ANTTLib::exCellVAlignment,long(2)); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem("This is a bit of long text that should break the line"),long(1),"bottom"); EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem("This is a bit of long text that should break the line"),long(1),"bottom"); |
220 |
How do change the foreground color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"ForeColor")))->PutDef(EXG2ANTTLib::exCellForeColor,long(255)); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
219 |
How do change the background color for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"BackColor")))->PutDef(EXG2ANTTLib::exCellBackColor,long(255)); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
218 |
How do I show buttons for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Button"))); var_Column->PutDef(EXG2ANTTLib::exCellHasButton,VARIANT_TRUE); var_Column->PutDef(EXG2ANTTLib::exCellButtonAutoWidth,VARIANT_TRUE); spG2antt1->GetItems()->AddItem(" Button 1 "); spG2antt1->GetItems()->AddItem(" Button 2 "); |
217 |
How do I show buttons for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Button")))->PutDef(EXG2ANTTLib::exCellHasButton,VARIANT_TRUE); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
216 |
How do I display radio buttons for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Radio")))->PutDef(EXG2ANTTLib::exCellHasRadioButton,VARIANT_TRUE); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
215 |
How do I display checkboxes for all cells in the column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Check")))->PutDef(EXG2ANTTLib::exCellHasCheckBox,VARIANT_TRUE); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
214 |
How can I display a tooltip when the cursor hovers the column
|
213 |
Is there any function to assign a key to a column instead using its name or capion
|
212 |
Is there any function to assign any extra data to a column
|
211 |
By default, the column gets sorted descending, when I first click its header. How can I change so the column gets sorted ascending when the user first clicks the column's header
|
210 |
How can I specify the maximum width for the column, if I use WidthAutoResize property
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Auto"))); var_Column->PutWidthAutoResize(VARIANT_TRUE); var_Column->PutMinWidthAutoResize(32); var_Column->PutMaxWidthAutoResize(128); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
209 |
How can I specify the minimum width for the column, if I use WidthAutoResize property
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Auto"))); var_Column->PutWidthAutoResize(VARIANT_TRUE); var_Column->PutMinWidthAutoResize(32); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
208 |
Is there any option to resize the column based on its data, captions
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"A")))->PutWidthAutoResize(VARIANT_TRUE); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |
207 |
How can I align the icon in the column's header in the center
|
206 |
How do I align the icon in the column's header to the right
|
205 |
How do I show or hide the sorting icons, but still need sorting
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Sorted")))->PutSortOrder(EXG2ANTTLib::SortAscending); spG2antt1->GetColumns()->GetItem(long(0))->PutDisplaySortIcon(VARIANT_FALSE); |
204 |
How do I enable or disable the entire column
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); spG2antt1->GetColumns()->Add(L"C1"); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Disabled")))->PutEnabled(VARIANT_FALSE); EXG2ANTTLib::IItemsPtr var_Items = spG2antt1->GetItems(); var_Items->PutCellValue(var_Items->AddItem(long(0)),long(1),"0.1"); EXG2ANTTLib::IItemsPtr var_Items1 = spG2antt1->GetItems(); var_Items1->PutCellValue(var_Items1->AddItem(long(1)),long(1),"1.1"); |
203 |
How do I disable drag and drop columns
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"C1")))->PutAllowDragging(VARIANT_FALSE); ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"C2")))->PutAllowDragging(VARIANT_FALSE); |
202 |
How do I disable resizing a column at runtime
|
201 |
How can I align the column to the right, and its caption too
/* Copy and paste the following directives to your header file as it defines the namespace 'EXG2ANTTLib' for the library: 'ExG2antt 1.0 Control Library' #import <ExG2antt.dll> using namespace EXG2ANTTLib; */ EXG2ANTTLib::IG2anttPtr spG2antt1 = GetDlgItem(IDC_G2ANTT1)->GetControlUnknown(); EXG2ANTTLib::IColumnPtr var_Column = ((EXG2ANTTLib::IColumnPtr)(spG2antt1->GetColumns()->Add(L"Column"))); var_Column->PutAlignment(EXG2ANTTLib::RightAlignment); var_Column->PutHeaderAlignment(EXG2ANTTLib::RightAlignment); spG2antt1->GetItems()->AddItem(long(0)); spG2antt1->GetItems()->AddItem(long(1)); |